home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / gnat200s / gnatinfo.txt < prev    next >
Text File  |  1996-01-30  |  55KB  |  1,239 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                              GNAT DOCUMENTS                              --
  4. --                                I N T R O                                 --
  5. --                                                                          --
  6. --                                                                          --
  7. --                                                                          -- 
  8. --                                                                          --
  9. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  10. --                                                                          --
  11. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  12. -- terms  of the GNU  General  Public  License  as  published  by the  Free --
  13. -- Software  Foundation;  either version 2,  or (at your option)  any later --
  14. -- version.  GNAT is distributed  in the hope  that it will be useful,  but --
  15. -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT- --
  16. -- ABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public --
  17. -- License  for  more details.  You should have received  a copy of the GNU --
  18. -- General Public License along with GNAT;  see file COPYING. If not, write --
  19. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  20. --                                                                          --
  21. ------------------------------------------------------------------------------
  22.  
  23. Contents.
  24. ---------
  25.    Running GNAT.
  26.    A small example.
  27.    Gnatbl.
  28.    Using the binder.
  29.    Using gcc to compile.
  30.    Using gcc for syntax checking.
  31.    Using gcc for semantics checking.
  32.    Search Paths and the Run Time Library (RTL).
  33.    Options.  
  34.    Constraint Checking and Pragma Suppress
  35.    Software Overflow Checking
  36.    Order of Compilation Issues.
  37.    File Name Rules.
  38.    Gnatk8.
  39.    Compiling Files With Several Compilation Units.
  40.    Cross Reference Tool.
  41.    Implementation of Intrinsic Functions.
  42.    Getting Internal Debugging Information.
  43.    When GNAT crashes.
  44.    Using gdb.
  45.    Features supported/unsupported.
  46.    Files.
  47.    Ada Mode for Emacs.
  48.    Copyright considerations.
  49.    How to get in touch with us.
  50.    Schedule.
  51.    A short gnat paper.
  52.    The GNAT development team.
  53. ------------------------------------------------------------------------------ 
  54.  
  55. Running GNAT.
  56. -------------
  57. Three steps are needed to create an executable file from an Ada source file:
  58. it must first be compiled, it then must go through the gnat binder, and then
  59. all appropriate object files it needs are then linked together to produce an
  60. executable.  A tool has been provided to combine the last 2 steps into one
  61. command.
  62.  
  63. A small example.
  64. ----------------
  65.  
  66. The file hello.adb contains the source of our modest version of the
  67. "Hello World" program.  Other components of this program are contained
  68. in the GNAT Runtime Library (RTL).  You needn't mention the files
  69. containing these other components but you can find the sources (s-io.ads,
  70. s-io.adb, and a-cio.c) in the RTL source directory (described below).
  71.  
  72. Note: Some previous versions of GNAT made reference to io.ads and io.adb. These
  73. have now been replaced by s-io.ads and s-io.adb.
  74.  
  75. The file hello.adb can be found in the current distribution in the examples
  76. directory.  Here are the commands for building and running it (Since this
  77. documentation is for systems running Unix and also for those running
  78. IBM OS/2 2.x, in places where the instructions differ a prefix "Unix:" or
  79. "OS/2:" or "DOS:" indicates what is relevant for each system):
  80.  
  81.             gcc -c hello.adb
  82.       Unix: gnatbl -o hello hello.ali
  83.       OS/2: gnatbl -o hello.exe hello.ali
  84.       DOS : gnatbl -o hello.exe hello.ali
  85.  
  86. create the executable called "hello" or "hello.exe" in your current directory.
  87. Typing
  88.  
  89.       hello
  90.  
  91. will allow you to verify that the system is alive and willing to enter into 
  92. a primitive dialogue.
  93.  
  94. The gcc switch -c indicates that we only want to compile, not link. The gnatbl
  95. step produces the executable by means of calling the GNAT binder, compiling
  96. its output, and calling gcc with the needed object files and libraries to
  97. link the executable.  The -o switch is passed to the linker to name the
  98. resulting executable file.  On DOS the linker creates a COFF file which can't
  99. be executed directly, so the additional step of calling "coff2exe" is done
  100. in order to produce a proper executable file.
  101.  
  102. As the example suggests, the gcc command recognizes the extension .adb as
  103. an indication of an Ada source file and calls the appropriate programs
  104. to generate an object file (hello.o or hello.obj) and an Ada Library
  105. Information (ALI) file (hello.ali) containing dependency information used
  106. by the binder to verify consistency and determine order of elaboration.
  107. The "ali" extension is recognized by gnatbl as the ALI file of the main
  108. procedure or function, and gnatbl uses it to create a file called the
  109. bind file, and to gather all the needed object files for linking.
  110.  
  111.  
  112. Gnatbl
  113. -----
  114.   gnatbl
  115.        [-o exec_name]
  116.        [-v]                  -- verbose mode
  117.        [-linkonly]           -- doesn't call the binder
  118.        [-gnatbind name]      -- full name for gnatbind
  119.        [-gnatlink name]      -- full name for the linker (gcc)
  120.        [list of objects]     -- non Ada binaries
  121.        [linker options]      -- other options for the linker
  122.  
  123. The program gnatbl is being provided on a temporary basis to simplify
  124. binding and linking using the RTL in the most simple situations.  It will
  125. be replaced later by a more complete utility to build a complete Ada
  126. system.  Gnatbl calls gnatbind which creates a C file (b_hello.c in our
  127. simple example) containing calls to all of the elaboration routines.
  128. Gnatbind is described more fully below.  The typical use of GNAT (currently
  129. -- in the presence of gnatbl) to construct a program consisting of a mix
  130. of Ada and C sources is to compile all of the sources using "gcc -c" to
  131. generate object (.o or .obj) files.  In the case of Ada sources, ALI files
  132. with the extension .ali are also produced.  Then gnatbl is used to construct
  133. the executable.  All arguments to gnatbl are simply passed through to gcc
  134. to link the objects together, with the exception of a file name with the
  135. .ali extension.  Such an argument is presumed to be the ALI file of the
  136. main procedure of the program.  When gnatbl sees a .ali file it calls gnatbind
  137. to create the bind file, compiles the bind file, extracts a list of needed
  138. object files from the bind file, and replaces the .ali argument with the
  139. a list of object files (the result of compiling the bind file and the list
  140. extracted from the bind file) in the gcc command it makes.  As a quick
  141. illustration consider a program comprising main.adb, foo.adb and bar.c.
  142. After compiling these sources into object files, the command (under Unix)
  143.  
  144. gnatbl -o main main.ali bar.o
  145.  
  146. would cause gnatbl to:
  147.   call "gnatbind main.ali", generating b_main.c
  148.   call "gcc -c b_main.c"
  149.   call "gcc -o main b_main.o main.o foo.o bar.o (+ gnat library args)"
  150.  
  151. In the last step, the "main.ali" argument has been replaced by all of the
  152. object files needed by main (the binder file, main itself, and foo -- upon
  153. which main depends). All other gnatbl arguments are passed through unchanged
  154. to gcc.  Finally a -l and a -L argument are added to the end of the gcc call
  155. to point it to the gnatlib library.  (Under OS/2, the command line and
  156. behavior of gnatbl is similar.)  (Under DOS, the additional step of calling
  157. "coff2exe main" is done.)
  158.  
  159. A current limitation of the very simplistic gnatbl is that the main program
  160. must be Ada and that it depends on all of the necessary library units.  In
  161. other words, there can be only one .ali file listed and it must be the
  162. main program.  This particularly restricts gnatbl's use when a routine written
  163. in another language calls an Ada subprogram which is not also called from
  164. Ada.
  165.  
  166. [-o exec_name]
  167.   Under unix if the -o option is omitted the executable is called the name of
  168.   the main unit. So "gnatbl try.ali" will create an executable called try.
  169.   Under DOS and OS/2 it would create an exectuable called try.exe.
  170.  
  171. [-v]
  172.   The verbose option is most useful when the user wants to see what set of
  173.   object files that are being used in the link step.
  174.  
  175. [-linkonly]           -- doesn't call the binder
  176.   Do not call gnatbind but rather use the bind file that has already been
  177.   generated. This option is useful if the user wants to pass options to
  178.   gnatbind which is not directly possible with gnatbl. The sequence would be:
  179.   
  180.   gnatbind binder_options file.ali
  181.   gnatbl -linkonly file.ali
  182.  
  183. [-gnatbind name]      -- full name for gnatbind
  184.   Allows the user to specify the full path of the gnatbind executable that
  185.   gnatbl should use rather than the default one on the path.
  186.  
  187. [-gnatlink name]      -- full name for the linker (gcc)
  188.  
  189. Using the Binder.
  190. -----------------
  191.  
  192. In the "Hello World" example, if gnatbl were not used, the second step
  193. would have been to call the binder directly with the command:
  194.  
  195.        gnatbind hello.ali
  196.  
  197. This command generates a file named b_hello.c which needs to be compiled and
  198. linked together with hello.o (or hello.obj).  The file b_hello.c contains
  199. a program which contains calls to all of the elaboration routines of all
  200. of the units required by the subprogram whose ALI file is given on the command
  201. line.  Then it calls the Ada subprogram itself.  By default, this C function
  202. is called "main".  (For other options, see the section on options below.)
  203. The program gnatbind works by recursively processing the ALI files of all
  204. of the units that are needed.  These ALI files are found using the search
  205. path mechanism described below.  Since object and ALI files are always
  206. kept together, the object files needed for linking are found at the same
  207. time and are listed in a comment at the end of the bind file.  This is where
  208. gnatbl finds the list of object files required.
  209.  
  210. Using gcc to compile.
  211. ---------------------
  212.  
  213. In the usual procedures for using GNAT, Ada source programs are compiled into
  214. object files using the driver program 'gcc' with the option '-c' (compile
  215. only). Gcc recognizes the ada filename extensions .ads and .adb (discussed
  216. more thoroughly below) and calls the actual compiler, 'gnat1' to compile
  217. the source file.  Gcc has many switches which you will need your gcc
  218. documentation to learn about.  In addition, gcc passes gnat1 switches
  219. through to gnat1.  These (with a couple of exceptional abbreviations) are
  220. spelled on the gcc command line by "-gnatXXX".  Thus
  221.  
  222.         gcc -c -gnata foo.adb
  223.  
  224. causes gcc to call the Ada compiler gnat1 with gnat1's '-a' switch; the '-c'
  225. is understood by gcc to mean that it is done after producing the object file
  226. (it won't try to link).  The output of this command is the object and ALI
  227. files for foo.
  228.  
  229. In the future, the gcc and the GNAT-specific switches will be more fully
  230. integrated.  At this time, there is the "-gnatXXX" mechanism for passing
  231. switches through to gnat1.  Some of these switches are described in
  232. specific sections of this document; a more complete discussion is in the
  233. options section below.  Note that gcc passes these switches to gnat1
  234. with the "gnat" prefix, where it is stripped off.  This means that
  235. when gnat1 is executed the "gnat" prefix is required; but in all of the
  236. documentation the switches are described without the prefix.
  237.  
  238. Three gcc options are translated to gnat1 arguments when seen on the gcc
  239. command line.  These are "k8" (file name limit), "83" (Ada83 syntax) and
  240. "w" (warning mode). Thus, the following commands are identical:
  241.  
  242.      gcc -ws -k8 file.adb
  243.      gcc -gnatws -gnatk8 file.adb
  244.  
  245. i.e., both of them suppress warning messages from GNAT, and expect file names
  246. to be 8 characters long at most (see below for usage).
  247.  
  248. In addition, the following gcc switches are passed through and recognized by 
  249. gnat1 with the same effects as in cc1 (as for C files): "-g*" (other than
  250. "-gnat*"); "-O*"; "-p"; "-pg"; "-f*"; "-d*"; "-S".  For example, 
  251.  
  252.       gcc -c -g math.adb
  253.  
  254. will generate debugging information that can be used with the debugger gdb
  255. (see below).
  256.  
  257. The other flags that control gcc itself (notably -B and -c) and the 
  258. assembler, behave as usual. Please consult your GCC documentation for details.
  259.  
  260.  
  261. Using gcc for syntax checking
  262. ------------------------------
  263.  
  264. The current release of GNAT implements the full Ada 9X grammar as described in 
  265. annotated Ada Reference Manual for Ada 9X (AARM, version 4.0). We think the
  266. parser gives excellent error messages (try it and see!) and is pleasantly 
  267. fast (again, try and see!).
  268.  
  269. To run GNAT in syntax checking only mode, use the switch "s",
  270. that is to say, enter the command:
  271.  
  272.     gcc -c -gnats file
  273.  
  274. where file is the name of the file to be checked. (Under Unix, wild cards can
  275. be used to check a set of files, as in *.adb.)  Note that the 'compile only'
  276. flag has to be given for gcc, as well as the 'syntax only' flag, which is
  277. GNAT-specific.  We will remove this redundancy in subsequent releases. 
  278.  
  279. The syntax checker is complete, and quite robust. If you manage
  280. to blow it up, or if it fails to diagnose an error, or lets a syntactically
  281. invalid program through, definitely let us know (see separate section below). 
  282. If you find an error message you think could be improved, let us know as well. 
  283. Of course, no compiler can ever have perfect error messages (that would involve
  284. mind reading), but we are committed to doing as well as possible, so we are
  285. happy to get suggestions in this department.
  286.  
  287. Using gcc for semantics checking
  288. --------------------------------
  289.  
  290. The command to perform semantic checking is:
  291.  
  292.     gcc -c -gnatc file
  293.  
  294. To operate in this mode, since WITH'ed files must be accessed, the GNAT
  295. semantic restrictions on file structuring must be followed:
  296.  
  297.      o    The needed source files must be accessible.  See the section
  298.         below on search paths.
  299.  
  300.      o    Each file must contain only one compilation unit.
  301.     See the section below on file name rules.
  302.  
  303.      o    The file name and unit name must match as described below, under
  304.         File name rules.
  305.  
  306. Note that the use of search paths and the flexibility of the File name
  307. rules will increase in the future as described in the sections on these
  308. facilities.
  309.  
  310. The coverage of semantic checks is still incomplete, and the system
  311. is not very robust in the presence of semantically illegal programs.
  312. Nevertheless, this release supports many more features of Ada9X than the
  313. previous one, and semantic checking is correspondingly more extensive. 
  314.  
  315. Here, use of the 'report errors immediately' switch ("-e", i.e., "-gnate" on
  316. the gcc command line) will help pinpoint the source of the trouble if the
  317. system misbehaves. 
  318.  
  319. Search paths and the Run Time Library (RTL)
  320. -------------------------------------------
  321.  
  322. With GNAT's source based library system, the compiler must be able to find
  323. source files for units that are needed by the unit being compiled.  Also,
  324. during binding, ALI files are needed to do the required checking of
  325. compilation order and to determine elaboration requirements.  Both the
  326. compiler and the binder use search paths to locate the files that they need.
  327. The rules are straightforward.
  328.  
  329. The compiler compiles one source file whose name must be givien explicitly
  330. on the command line (i.e. there is no searching done for this file).  All
  331. other source files that are needed (the most common being the specs of
  332. WITH'ed units) are found by looking in the following directories: 
  333.  
  334.    o The first directory searched is the directory containing the source
  335.      file of the main unit being compiled (the file name on the command
  336.      line).
  337.  
  338.    o (UNIMPLEMENTED SO FAR) Next, the compiler looks in each directory
  339.      named by a "-I" option given to gcc (in the order given on the
  340.      command line).
  341.  
  342.    o Then the compiler looks in each of the directories listed in the value
  343.      of the ADA_INCLUDE_PATH environment variable.  This value is constructed
  344.      exactly as the PATH environment variable -- a list of directory names
  345.      separated by ':' or ';' (Unix or OS/2, respectively) characters. Under
  346.      OS/2, this mechanism is used to locate the RTL source files in place of
  347.      the default location described next for Unix.
  348.  
  349.    o (Unix only) Finally the compiler looks in the default location for
  350.      the GNAT Run Time Library (RTL) source files that is determined at the
  351.      time that GNAT is built and installed on your system.
  352.  
  353. The compiler outputs its object files and ALI files in the current working
  354. directory (NOTE: the object file can be redirected with the -o option;
  355. however, gcc and gnat1 have not been coordinated on this so the ALI file
  356. will not go to the right place -- DON'T DO THIS).
  357.  
  358. The binder takes the name of an ALI file as its argument and needs to locate
  359. other ALI files in its recursive processing.  These are found in the
  360. following directories:
  361.  
  362.    o First, the current working directory is searched.
  363.  
  364.    o (UNIMPLEMENTED SO FAR) Next, the binder looks in directories named
  365.      in "-L" options on the gnatbind command line (in the order given).
  366.  
  367.    o Next, the binder looks in each of the directories listed in the value
  368.      of the ADA_OBJECTS_PATH environment variable.  This value is constructed
  369.      exactly as the PATH environment variable -- a list of directory names
  370.      separated by ':' or ';' (Unix or OS/2, respectively) characters. Under
  371.      OS/2, this mechanism is used to locate the RTL object files in place of
  372.      the default location described next for Unix.
  373.  
  374.    o (Unix only) Finally the binder looks in the default location for
  375.      the GNAT Run Time Library (RTL) object files that is determined at the
  376.      time that GNAT is built and installed on your system.
  377.  
  378. The binder generates the bind file (a C language source file) in the
  379. current working directory.
  380.  
  381. The packages Ada, System, and Interfaces and their children make up the GNAT
  382. Run Time Library, together with the simple System.IO package used in the "Hello
  383. World" example.  The sources for these units are needed by the compiler
  384. and are kept together in one directory (not all of the bodies are needed,
  385. but all of the sources are kept together anyway).  The ALI files and object
  386. files generated by compiling the RTL are needed by the binder and the linker,
  387. and are kept together in one directory (typically different from the
  388. directory containing the sources).  In a normal installation, the user will
  389. not need to specify these directory names when compiling or binding (or
  390. binding and linking with gnatbl -- though the call to the linker contains
  391. explicit pathnames of the object files).  Either the environment variables
  392. (OS/2) or the builtin defaults will cause these files to be found.
  393.  
  394. Besides the assistance in using the RTL, a major use of search paths is
  395. in compiling sources from multiple directories.  This can make development
  396. environments much more flexible.
  397.  
  398. The user might use the search paths to experiment with alternative RTLs, or
  399. to create new libraries (not the technical Ada meaning here).
  400.  
  401.  
  402. Options.
  403. --------
  404.  
  405. Error reporting, as well as other aspects of the behavior of the system,
  406. are controlled by the following flags. All of these must be entered with
  407. the prefix '-gnat'. For example, '-gnatv83' specifies verbose mode for
  408. output, and Ada83 syntax checking. 
  409.  
  410.   a      Assertions enabled. Pragma Assert and Debug to be activated.
  411.   b      Generate brief messages to stderr even if verbose mode set.
  412.   c      Check syntax and semantics only (no code generation attempted)
  413.   e      Error messages generated immediately, not saved up till end
  414.   f      Full errors. Normally only the first error on each line is reported.
  415.   g      GNAT style checks enabled - col alignment, spacing, capitalization.
  416.       See any source file for examples.
  417.   ix      Identifier char set (x=1/2/3/4/p/f/n/w) default = i1 (Latin-1)
  418.         1-4 = Latin 1-4, p = IBM PC, f/n = full/no, upper w=wide_character
  419.   knnn      Limit file names to k characters (k = krunch)
  420.   l      Output full source listing with embedded error messages
  421.   mnnn      Limit number of detected errors to nnn (1-999)
  422.   n      No inlining of subprograms (ignore pragma Inline)
  423.   o       Enable integer overflow checking using range checks
  424.   p      Automatic suppression of all run-time checks mentioned in LRM 11.7
  425.   r      Reference manual column layout required
  426.   s      Syntax check only
  427.   t      Do semantic processing even if there are syntax errors.
  428.   u      List units for this compilation
  429.   v      Verbose mode. Full error output with source lines to stdout.
  430.   wx      Warning mode. s = suppress, e = treat as error
  431.   83      Enforce Ada 83 restrictions
  432.   sfile      Source file names (wild cards allowed for multiple files)
  433.  
  434. Some of these options are explained in more detail elsewhere in this document.
  435. For full information, refer to file usage.adb in this distribution.
  436.  
  437. For first-time users, and for first-compilation attempts, the following mode
  438. of operation is recommended:
  439.  
  440.       gcc -c -gnatc lets_try_this.adb
  441.  
  442.  
  443.  
  444. Constraint Checking and Pragma Suppress
  445. ---------------------------------------
  446. In the current version there are some checks performed that are mentioned in
  447. the LRM in section 11.7. These are:
  448.  
  449. range checks on signed integer and enumeration types
  450.   (assignment, in parameters and initial values in object declarations)
  451. index checks
  452. access checks
  453.  
  454. Since this is relatively new, there might still be some cases where exceptions
  455. are raised where they shouldn't. To disable constraint checks, compile the
  456. program with the "-gnatp" option. This is equivalent to having Pragma suppress
  457. applied to everything. Gdb can be used to find where the exception was raised.
  458. See the section on  "Using gdb" for further information.
  459.  
  460. Software Overflow Checking
  461. --------------------------
  462.  
  463. The -gnato enables "software overflow checking". Eventually we plan to
  464. implement integer overflow checking in the GCC backend, using efficiently
  465. whatever hardware features are available (flags, sticky flags, traps etc.)
  466.  
  467. For targets for which this is not implemented (currently this is all
  468. targets), we provide an alternative, which works by doing arithmetic
  469. operations in double length followed by explicit range checks.
  470.  
  471. This is of course very expensive, so the normal mode suppresses
  472. overflow checking by this means. The -gnato switch overrides this
  473. default so that you get overflow checking using this software range
  474. checking approach if necessary.
  475.  
  476. Please note that there seem to be some bugs in the generated code when
  477. this is used with 32-bit integers and larger on the PC. We are
  478. investigating this problem.
  479.  
  480. Order of Compilation Issues.
  481. ----------------------------
  482.  
  483. If, in our example, there were a spec for the hello procedure, it would
  484. be contained in the file "hello.ads"; yet this file would not need to be
  485. explicitly compiled.  This is the result of the model we chose to implement
  486. library management. Details of the model can be found in file gnote1. Some of
  487. the unexpected consequences of the model (unexpected from the point of view
  488. of existing Ada compiler systems) are the following: 
  489.  
  490.      o    There is no point in compiling generics or specifications (except for
  491.     package specifications with no bodies), since these are compiled as
  492.     needed by clients. If you do attempt a useless compilation, you will
  493.     get a warning message. It is also useless to compile subunits in this
  494.     mode, since they are compiled as needed by the parent.
  495.  
  496.      o    There are no order of compilation requirements, and performing a
  497.     compilation never obsoletes anything. The only way you can obsolete
  498.     something and require recompilations is if one of the relevant source
  499.     files is modified.
  500.  
  501.      o    There is no library as such, apart from the .ali files, whose format 
  502.     is also described in libfmt.ads. For now, we find it convenient to
  503.     create separate .ali files, but eventually the information therein may
  504.     be incorporated into the object file directly.
  505.  
  506.      o    When you compile a unit, the source files for the specs of all 
  507.     units that it WITH's, all its subunits, and the bodies of any
  508.     generics it instantiates must be around (findable by the search
  509.         paths mechanism described above), or you will get a fatal error
  510.     message.
  511.  
  512. The above may seem surprising. Just to provide one immediate assurance,
  513. all of this does not mean that we are violating Ada's strict consistency 
  514. rules; they are enforced instead by the binder. 
  515.  
  516. File Name Rules
  517. ---------------
  518.  
  519. The current version of GNAT requires that file names match compilation unit
  520. names. The matching rules are as follows:
  521.  
  522.      o    The file name is obtained by replacing dots in the unit name with
  523.     minus signs, and adding a suffix distinguishing bodies and specs.
  524.     The suffix for specs is ".ads" and for bodies is ".adb".
  525.  
  526.     For example, files containing the unit very_long_unit_name would be
  527.         called:
  528.  
  529.         very_long_unit_name.ads
  530.         very_long_unit_name.adb
  531.  
  532.     in a modern system with no arbitrary file name length restrictions 
  533.     (most systems that support GCC are in this category, e.g., most
  534.     Unixes, OS/2, NT, Nextstep).
  535.  
  536.      o    When running under primitive systems (like DOS and OS/2 under FAT)
  537.         which permit only short file names, the file name itself needs to be
  538.         crunched to 8 characters. You can always find out the name it expects
  539.     by running gnatk8 or compiling it (since it warns you if it's wrong).
  540.  
  541.         So in DOS or OS/2 under FAT the filenames above would be crunched to:
  542.             velounna.ads
  543.             velounna.adb
  544.  
  545.         (The full details of the crunching algorithm are in source code of
  546.          krunch.adb)
  547.  
  548.      Under DOS -gnatk8 is the default, so crunching always takes place.
  549.      On all systems the RTL files are all crunched to 8 characters.
  550.  
  551. Gnatk8.
  552. -------
  553.  
  554. As mentioned in the previous section, gnatk8 can be used to find out what
  555. the krunched name of a file should be when using the -k8 (-gnatk8) option.
  556.  
  557. The first argument can now be an Ada name with dots or it can be the Gnat
  558. name of the unit where the dots representing child units or subunit are
  559. replaced by hypens. The only confusion arises if a name ends .ads or
  560. .adb, and we take this to be an extension if there are no other dots in the
  561. name and the whole name is in lower case.
  562.  
  563. The second argument represents the length of the krunched name. The default
  564. without any argument given is 8 characters. A length of zero stands for
  565. unlimited, i.e. no chop except for system files which are always 8.
  566.  
  567. Examples:
  568.    gnatk8 very_long_unit_name.ads       ---->  velounna.ads
  569.    gnatk8 very_long_unit_name.ads 6     ---->  vlunna.ads
  570.    gnatk8 very_long_unit_name.ads 0     ---->  very_long_unit_name.ads
  571.    gnatk8 grandparent-parent-child.ads  ---->  grparchi.ads
  572.    gnatk8 grandparent.parent.child      ---->  grparchi
  573.  
  574. Note:
  575.    gnatk8 grandparent.parent.child.adb  -----> grpachad
  576. Here the .adb at the end is taken as part of the unit name as explained in
  577. one of the preceeding paragraphs above.
  578.  
  579. Compiling Files With Several Compilation Units.
  580. -----------------------------------------------
  581.  
  582. GNAT can only deal with files that contain a single Ada compilation unit.
  583. However, since it is an established style for certain types of programs
  584. to contain more than one compilation in a file, such as in test suites,
  585. a simple utility program, "gnatchop", is provided to preprocess the file
  586. and split it several other files, one for each compilation unit.
  587. gnatchop takes a filename with any extension. This name can basically
  588. be anything.
  589.  
  590. Usage : gnatchop [-k] [-r] [-s] [-w] filename [directory]
  591.  
  592.   k         limit filenames to 8 characters
  593.   r         generate source reference pragmas
  594.   s         generate a compilation script
  595.   w         overwrite existing filenames
  596.   filename  source file
  597.   directory directory to place split files (default is the current directory)
  598.  
  599. For example, assume archive contains package spec part1, package body
  600. part1, package spec part2, package body part2.adb and subprogram part3 in
  601. any sequence.
  602.  
  603. "gnatchop archive" will create five files in the current directory called
  604. part1.ads, part1.adb, part2.ads, part2.adb, part3.adb. The optional directory
  605. argument places all the split files in that directory rather than the current
  606. directory. The directory must already exist otherwise gnatchop will reject it.
  607.  
  608. If at least one of the files to be split already exists, gnatchop will issue a
  609. message and exit unless the -w flag is used to overwrite existing files.
  610.  
  611. The -r flag causes source reference pragmas to be generated at the start of
  612. each file written. These pragmas will cause error message references and
  613. debugging source information to refer back to the original unchopped files.
  614. This is appropriate if you intend to maintain the program in unchopped form.
  615.  
  616. The -s flag generates a script which can be used to compile all the units
  617. contained in the original source file.
  618.  
  619.   Suppose that you wanted to compile all the units contained in a given file
  620.   called "archive" with some specific options like -gnatv, -O2 and -g. The
  621.   gnatchop with -s option will generate a script with the appropriate
  622.   extension depending on the the operating system. Then the script is
  623.   invoked with the options following at the end as given below.
  624.  
  625.   gnatchop -s archive
  626.   In Unix:  sh archive.sh -gnatv -O2 -g 
  627.   In Dos :  archive.bat -gnatv -O2 -g
  628.   In OS/2:  archive.cmd -gnatv -O2 -g
  629.  
  630. The -k flag krunches the names of the units to be 8 characters followed by the
  631. ads or adb extension.
  632.  
  633. Currently, if you want to specify more than one flag, you need to specify
  634. them separately.  For example, if you want to split archive.adb and specify
  635. both the -s and the -w flags, type "gnatchop -s -w archive" instead of
  636. "gnatchop -sw archive". This limitation will be lifted in the near future.
  637.  
  638. Note: gnatchop works fine for the case of a single compilation unit in a
  639. file, and this is useful in dealing with files that do not have names
  640. satisfying the GNAT naming requirements.
  641.  
  642. Cross Reference Tool.
  643. ---------------------
  644.  
  645. The GNAT system provides a standalone tool, gnatf, which allows for
  646. syntax and semantics checking without any code generation. This is
  647. somewhat faster than using "gcc -gnatc". 
  648.  
  649. Note: the standard gnat options that do not concern code generation are
  650.       still available in gnatf. However, they should not be preceeded by
  651.       -gnat, so to do syntax only checking with gnatf, use `gnatf -s file.adb'
  652.       not `gnatf -gnats file.adb'.
  653.  
  654. The real point of gnatf is that it contains a cross reference (xref)
  655. tool.  The goal of the xref tool is:
  656.  
  657.  1. Give precise information about all declared entities
  658.     (where they are defined and where they are used).
  659.     This is particularly useful in the ada emacs mode
  660.     that you will find with the distribution (see Ada Emacs
  661.     Mode below).
  662.  
  663.  2. Emit warnings if an entity is defined but never used or
  664.     a with clause is unnecessary, misplaced or redundant
  665.     (more on this later).
  666.  
  667.  3. In the future this tool will be the backbone of a smart
  668.     recompilation system which should reduce the number of
  669.     recompilations in the event of minor source code
  670.     modifications.
  671.  
  672. Usage : gnatf [-x[1-6]] files
  673.  
  674.   files The list of Ada source files to cross reference.
  675.  
  676. -x[1-6] The -x[1-6] flags control the amount of information given
  677.         by the xref tool. Flags -x1 and -x2 control the level of
  678.         warnings generated. These warnings are output on standard
  679.         error (usually the screen). Flags -x1 and -x2 do not cause
  680.         any cross reference information to be generated.
  681.         Flags -x[345] distribute cross reference information across
  682.         several files. Specifically for each file "f.adb" (resp. "f.ads")
  683.         in the `files' list we create a file "f.xrb" (resp. "f.xrs")
  684.         containing all cross reference information (more on this below).
  685.     Flag -x6 centralizes and stores this information in the single
  686.         file "X.ref".
  687.  
  688. Flags usage:
  689.  
  690.   -x1       Issues warnings for unnecessary, misplaced or redundant
  691.             ``with'' clauses. Specifically, a warning message is
  692.             generated in the following cases:
  693.  
  694.               - A compilation unit which is withed but never used
  695.                 (this works with child library units as well).
  696.  
  697.               - A compilation unit which is withed in a body (resp.
  698.                 subunit) if the same with clause already appears in
  699.                 the spec (resp. spec or body for subunits).
  700.  
  701.               - A compilation unit which is withed within a spec
  702.                 but is used only by the body or a subunit.
  703.  
  704.   -x2       Issues warnings on unused entities, that is entities that
  705.             are declared but never used. Note that we give *no*
  706.             warnings for unreferenced entities like:
  707.  
  708.               - Record fields, since they could be referenced indirectly
  709.                 by an aggregate.
  710.  
  711.               - Enumeration entities, since they could be referenced
  712.                 indirectly by enumeration ranges:
  713.                      for i in Color'First .. Color'Last
  714.  
  715.               - Loop parameters
  716.                     for I in 1 .. 80 loop
  717.                        Put ('x');
  718.                     end loop;
  719.  
  720.   -x[345]   Generate cross-reference information. Flag -x3 gives the most
  721.             succint xref information, -x5 the most comprehensive. Flag -x4
  722.             gives more information than -x3 but not as much as -x5. The
  723.             information given by flags -x3 and -x4 will be used in the smart
  724.             recompilation system currently under development and will
  725.             be described hereafter. Flag -x5 lists all entities defined or
  726.             used in the analyzed compilation units. It gives the source
  727.             location of their definition and all their uses in the analyzed
  728.             units.
  729.  
  730.   -x6       The cross reference output is the same as with -x5 except that
  731.             with -x6 all cross reference information is stored in the single
  732.             file "X.ref" and the entity kind of each cross referenced entity
  733.             is also given.
  734.  
  735. Cross reference information and smart recompilation
  736.  
  737.   The cross reference information gathered by flags -x3 and -x4 is a
  738.   subset of the information specified by flag -x5. The -x[34]
  739.   information is specifically tailored to the smart recompilation system
  740.   currently under development.  When flags -x3 or -x4 are selected, then
  741.   for each compilation unit "Unit" analyzed by the xref tool we gather
  742.   the following information:
  743.  
  744.     * The full graph of the source files directly or indirectly loaded as
  745.       a result of compiling "Unit" along with their time stamp. This graph
  746.       includes the with-ed unit graph rooted at "Unit" but contains also
  747.       other units automatically loaded by gnat during code generation
  748.       (generic bodies, subunits, bodies of inlined subprograms). This graph
  749.       is created only for flags -x[345].
  750.  
  751.     * The list of entities that can be exported from "Unit" to other Ada
  752.       sources along with their line and column of definition and use in
  753.       "Unit".
  754.  
  755.       If "Unit" is a subprogram or package spec, the notion of exported
  756.       entity matches the set of entities listed therein. If "Unit" is a
  757.       package body with no generics or inlined subprograms then no entities
  758.       are exported. In general, however, the set of entities exported from
  759.       "Unit" is the set of entities that are needed across compilation units
  760.       by gnat when generating code. Specifically inlined subprogram bodies
  761.       or generic bodies are always exported since these are inlined at the
  762.       point of use or instantiation. The same happens for subunits, which are
  763.       inlined in the parent unit.
  764.  
  765.       The difference between flags -x3 and -x4 is that -x3 omits all
  766.       generic bodies or inlined subprograms from the exported entities,
  767.       while flag -x4 includes them. Both -x3 and -x4 consider subunits as
  768.       exported entities.
  769.  
  770.       In addition we only consider outermeost visible entities to be
  771.       exported. That is a record or enumeration type may be exported but its
  772.       inner fields or enumeration literals are never considered exported
  773.       entities. Likewise for subprogram parameters and discriminants.
  774.  
  775.     * The list of entities *directly* imported by "Unit" from other Ada
  776.       sources, along with their lines and columns where they are used in
  777.       "Unit".
  778.  
  779.       The notion of imported entities falls off the notion of exported
  780.       entities (what is exported by one unit may be imported by another).
  781.  
  782. Cross reference file structure:
  783.  
  784.   The xref file is divided into various sections. There is one section
  785.   for each compilation unit explicitly requested in `files'. We
  786.   call these units, the RUs, short for requested units.  There is also
  787.   one section for each AU, short for auxiliary unit, that is, those
  788.   compilation units that get implicitly loaded by the compiler, but
  789.   whose compilation has not been explicitly requested by the user.
  790.   Specs of withed packages are typical auxiliary units.
  791.  
  792.   All entities exported by RUs (flags -x3 and -x4) or all entities
  793.   belonging to RUs (flags -x5 and -x6) appear in the xref file(s).
  794.  
  795.   However, only the entities defined in AUs that are imported in RUs
  796.   apper in the xref file. Their order is the order of declaration in
  797.   the source files.
  798.  
  799.   The sections in the xref referring to RUs and AUs are respectively denoted:
  800.  
  801.             %% unit.ad[sb]     for a RU.
  802.  
  803.             -- unit.ad[sb]     for an AU.
  804.  
  805.   Note: An entitiy defined inside a generic and used through a generic
  806.   instantiation, is listed under the xref section of the generic unit.
  807.  
  808.   Example: Follows a list of files and the corresponding cross reference.
  809.   ^^^^^^^
  810.                         test.adb
  811.                         ^^^^^^^^
  812.             01  with Part1;  --  unused
  813.             02  with Part2; use Part2;
  814.             03  procedure Test is
  815.             04
  816.             05     Thing : Number;
  817.             06     type Client is record
  818.             07        Number : Integer;
  819.             08        State  : Boolean;
  820.             09     end record;
  821.             10     type Color is (Red, Green);  -- unused
  822.             11     My_Client : Client;
  823.             12
  824.             13  begin
  825.             14     My_Client.Number := 1;
  826.             15     My_Client.State  := True;
  827.             16     Thing := 20;
  828.             17     Thing := Thing + Thing;
  829.             18  end;
  830.                       part1.ads
  831.                       ^^^^^^^^^
  832.             01  package Part1 is
  833.             02     type Useless is new Integer;
  834.             03  end;
  835.                       part2.ads
  836.                       ^^^^^^^^^
  837.             01  package Part2 is
  838.             02     type Number is new Integer range 1 .. 1000;
  839.             03     The_Number : constant := 42;
  840.             04  end;
  841.  
  842.   The result of invoking `gnatf -x5 test.adb' is the following
  843.   (just skim the "test.xrb", explanations follow):
  844.  
  845.                     Warnings on stderr (the screen)
  846.                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  847.              test.adb:1:06: warning: "Part1" withed but unused.
  848.              test.adb:3:11: warning: "Test" unused
  849.              test.adb:10:09: warning: "Color" unused
  850.  
  851.                            test.xrb
  852.                            ^^^^^^^^
  853.              01 V "SGNAT v1.0      "
  854.              02 test.adb                941012154746 2 3 
  855.              03 part1.ads               941012154531 
  856.              04 part2.ads               941012154620 
  857.              05 
  858.              06 %% test.adb
  859.              07 test 3:11 
  860.              08 thing 5:4 
  861.              09  {16:4 17:4 17:13 17:21}
  862.              10 client 6:9 
  863.              11  {11:16}
  864.              12 client.number 7:7 
  865.              13  {14:14}
  866.              14 client.state 8:7 
  867.              15  {15:14}
  868.              16 color 10:9 
  869.              17 red 10:19 
  870.              18 green 10:24 
  871.              19 my_client 11:4 
  872.              20  {14:4 15:4}
  873.              21 
  874.              22 -- part1.ads
  875.              23 part1 1:9 
  876.              24  {1:6}
  877.              25 
  878.              26 -- part2.ads
  879.              27 part2 1:9 
  880.              28  {2:6 2:17}
  881.              29 number 2:9 
  882.              30  {5:14}
  883.  
  884.   Explanations:
  885.   ^^^^^^^^^^^^
  886.   File "Test" is the only RU (requested unit). AUs (auxiliary
  887.   units are packages "Part1" and "Part2". First the graph of
  888.   the loaded units with their time stamps is given
  889.  
  890.              02 test.adb                941012154746 2 3 
  891.              03 part1.ads               941012154531 
  892.              04 part2.ads               941012154620 
  893.  
  894.   Unit "Test" requires the loading of units "Part1" and "Part2"
  895.   (the second and third units listed in the inclusion graph).
  896.   Entry
  897.              06 %% test.adb
  898.              07 [...]
  899.              08 thing 5:4 
  900.              09  {16:4 17:4 17:13 17:21}
  901.  
  902.   means that "Thing" is an entity (a variable) defined in line 5
  903.   column 4 and used in line 16 column 4, line 17 columns 4, 13 and 21
  904.   in file "test.adb". 
  905.  
  906.   Note that entity "Useless" may be used in units other than "Test"
  907.   but that information is not contained in the "test.xrb" since "Test"
  908.   does not ude "Useless".
  909.  
  910. Implementation of Intrinsic Functions.
  911. --------------------------------------
  912. GNAT version 1.79 begins to implement intrinsic functions. In particular,
  913. the shift functions predefined in Interfaces are now implemented.
  914.  
  915. The implementation is quite general. You can define shift operations (i.e.
  916. one of the five operations, Shift_Left, Shift_Right, Shift_Right_Arithmetic,
  917. Rotate_Left, Rotate_Right) on any integer type, signed or unsigned, whose
  918. Size is 8, 16, 32 or 64 bits, and then provide an appropriate pragma Import
  919. Intrinsic, and everything will work.
  920.  
  921. In other words, the package Interfaces is not using any special magic, and
  922. you can do exactly what it does to make shift operations available for any
  923. integer types that meet the size criteria (shift operations for wierd-sized
  924. integers seem too marginal to worry about!)
  925.  
  926. Example:
  927.  
  928.    type My_Type is new Integer;
  929.  
  930.    function Shift_Left (Val : My_Type; Count : Natural) return My_Type;
  931.    pragma Import (Intrinsic, Shift_Left);
  932.  
  933. The exact requirements on the pragma Import are as follows:
  934.  
  935.   The function must have one of the five standard names
  936.  
  937.   There must be two arguments
  938.  
  939.   The first argument can be of any integer type with a size of 8, 16, 32, 64
  940.   either signed or unsigned.
  941.  
  942.   The return type must be the same as the first argument type
  943.  
  944.   The second argument (the shift count), can be of any integer type
  945.  
  946. Getting Internal Debugging Information.
  947. ---------------------------------------
  948.  
  949. Most compilers have secret internal debugging switches and modes. GNAT is
  950. no exception, except that nothing about GNAT is secret. A summary and full
  951. description of all the compiler/binder debug flags can be found in the file
  952. debug.adb. You will have to get the sources of the compiler to see the full
  953. detailed effects of these, but feel free to experiment with them.
  954.  
  955. The switches that print the source of the program (reconstructed from the
  956. internal tree) are of general interest, as are the options to print the full
  957. internal tree, and the entity table (that is to say, the symbol table
  958. information). 
  959.  
  960. When GNAT crashes. 
  961. ------------------
  962.  
  963. There are several things you can do when GNAT does the unexpected while
  964. compiling your Ada program, such as aborting with a segmentation fault
  965. or illegal memory access, raising an internal exception, or otherwise
  966. terminating abnormally. The following lines of action are of course
  967. palliatives that will become unecessary as the system becomes more complete
  968. and robust. The following strategies are presented in increasing order of
  969. difficulty, corresponding to the sophistication of the user, and her
  970. curiosity about the functioning of the compiler.
  971.  
  972.   1. run gcc with the -gnatf and -gnate switches.
  973.      The 'f' switch causes all errors on a given line to be reported. In
  974.      its absence, only the first error on a line is displayed. 
  975.  
  976.      The 'e' switch causes errors to be displayed as soon as they are 
  977.      encountered, rather than after compilation is terminated.
  978.  
  979. Often this will be enough to identify the construct that produced the crash.
  980.  
  981.   2. run gcc with -v (verbose) switch. In this mode, gcc produces ongoing 
  982.      information about progress of the compilation and in particular the name 
  983.      of each procedure as it begins to generate code for it. This switch
  984.      allows you to find which Ada procedure it was compiling when it ran into 
  985.      a code generation problem. 
  986.  
  987.   3. run gcc with the -gnatdc switch. This is a GNAT-specific switch that
  988.      does for the front-end what -v does for the back-end. The system prints
  989.      the name of each unit, either compilation unit or nested unit, as it
  990.      is being analyzed. 
  991.  
  992.   4. On systems that have gdb available (like most Unix systems), you can run
  993.      gdb directly on the gnat1 executable. Gnat1 is the front-end of
  994.      GNAT, and can be run independently (normally it is just called from gcc).
  995.      You can use gdb on gnat1 as you would on a C program (but see below for
  996.      caveats). The "where" command is the first line of attack; the variable
  997.      "lineno"  (seen by "print lineno") used by the second phase of gnat1
  998.      and by the gcc back-end, indicates the source line at which the execution
  999.      stopped, and "input_filename" the name of the source file.
  1000.  
  1001. Using gdb on systems that provide it (currently not available under OS/2)
  1002. -------------------------------------------------------------------------
  1003.  
  1004. Gdb awaits modifications to handle Ada properly, and for now can only be
  1005. used as it would be for a c program. (Someone is working on the proper
  1006. extensions, and these will appear in subsequent releases.) In the meantime,
  1007. the following naming conventions will allow you to find the Ada entities
  1008. defined in your program:
  1009.  
  1010. a)  The names of all entities (variables, subprograms, etc.) are converted to
  1011.     lower case. 
  1012.  
  1013. b)  Entities that appear in library package declarations have the name
  1014.     package_name__subprogram_name (Note the two underscores separating 
  1015.     package name from subprogram name). 
  1016.  
  1017. Exceptions can be caught by breaking in the "__gnat_raise" routine and then
  1018. doing a "bt" or "where" command.
  1019.  
  1020. Features supported/unsupported
  1021. ------------------------------
  1022. A full listing of features supported/unsupported is available separately in
  1023. the file "features" included in the distribution. Note that this usually
  1024. changes with each distribution, so read often.
  1025.  
  1026. Files.
  1027. ------
  1028.  
  1029. If you want to examine the workings of the GNAT system, the following
  1030. haiku-like description of its organization might be of minimal use:
  1031.  
  1032. File with prefix "sc" contain the lexical scanner.
  1033.  
  1034. All files prefixed with "par" are components of the parser. The numbers 
  1035. correspond to chapters of the Ada83 LRM (or the corresponding sections of 
  1036. the Ada9X LRM).  For example, parsing of select statements can be found 
  1037. in par-ch9.
  1038.  
  1039. All files prefixed with "sem" perform semantic analysis. Same numbering scheme.
  1040. For example, all issues involving context clauses can be found in sem_ch10.
  1041.  
  1042. All files prefixed with "exp" perform AST normalization and expansion. 
  1043. For example, the construction of record initialization procedures is 
  1044. done in exp_ch3.
  1045.  
  1046. The files prefixed with "bind" implement the binder, which verifies the
  1047. consistency of the compilation, determines an order of elaboration, and
  1048. generates the bind file.
  1049.  
  1050. The file atree details the low-level data structures used by the front-end.
  1051. The file sinfo details the structure of the AST as produced by the parser.
  1052. The file einfo details the attributes of all entities, computed during
  1053. semantic analysis.
  1054.  
  1055. Library management issues are dealt with in files with prefix "lib".
  1056.  
  1057. Files with prefix a- are GNAT-specific C files. They are the components of
  1058. Gigi (gnat-to-gnu), the program that translates the Ada AST into gcc tree 
  1059. fragments. Gigi makes use of C versions of atree, einfo and sinfo, called 
  1060. a-atree.[ch], a-einfo.[ch] and a-sinfo.h respectively.
  1061.  
  1062. All the other .c files are modifications of common GCC files. 
  1063.  
  1064. Happy browsing!
  1065.  
  1066. Ada Mode for Emacs
  1067. ------------------
  1068.  
  1069. In the subdirectory `emacs-ada-mode' you will find a bunch of files
  1070. implementing an Ada mode under Gnu emacs. The mode is still under
  1071. development, but a number of features are complete. For instance, the
  1072. Ada mode has the same indenting friendliness that C programmers get
  1073. with the c-mode, you can toggle between spec and body with a few
  1074. keystrokes, etc. This mode also uses gnatf to be able to point to an
  1075. entity with the mouse, click it and open a window with its definition.
  1076. This mode is copywrited by Markus Heritsch and Rolf Ebert.
  1077.  
  1078. Copyright Considerations
  1079. ------------------------
  1080.  
  1081. For now, everything is copyrighted by NYU, using the GNU public license. This
  1082. means that you can copy everything freely, but you can't incorporate the code
  1083. directly into a commercial program. For more information on the GNU license,
  1084. see the file header. One important note is that it will be possible
  1085. to use GNAT to generate software that is not itself covered by the GNU license.
  1086. Eventually the copyright will be transferred to the Free Software Foundation,
  1087. so that GNAT can be distributed directly by FSF under the same restrictions (or
  1088. what we like to think of as lack of restrictions!).
  1089.  
  1090. How to Get in Touch with Us
  1091. ---------------------------
  1092.  
  1093. To get on our external INTERNET mailing list, send a message to:
  1094.  
  1095.     gnat-request@cs.nyu.edu
  1096.  
  1097. Submitting Bug Reports
  1098. ======================
  1099.  
  1100. We welcome bug reports, they are of course a vital part of the process of
  1101. getting GNAT into solid shape. You will help us (and make it more likely
  1102. that you receive a timely response) if you follow these guidelines.
  1103.  
  1104. We only receive bug reports by internet, addressed to gnat-report@cs.nyu.edu.
  1105. At the moment we cannot process bug reports from any other source.
  1106.  
  1107. Note: if you believe you have found a GCC (C language or configuration
  1108. file) bug rather than an GNAT (Ada language) bug please report it to
  1109. bug-gcc@prep.ai.mit.edu.  If you have found a bug when using GCC to
  1110. compile C++, please report it to bug-g++@prep.ai.mit.edu.
  1111.  
  1112. Please put one bug in a message, and add a short but specific subject (a
  1113. general subject like "GNAT bug" is not so useful, a title like "bug in
  1114. visibility with generics" is more useful).
  1115.  
  1116. Please include full sources. We can't duplicate errors without the full
  1117. sources. Include all sources in the single email message with appropriate
  1118. indications in the multiple file cases, see below.
  1119.  
  1120. Please send all sources in plain ASCII form, we can't process compressed,
  1121. uuencoded etc. messages in our current form (they have to go through extra
  1122. steps, and easily get lost, separated from the author etc during this process).
  1123.  
  1124. Please include COMPLETE identification of the version of the system you are
  1125. running.
  1126.  
  1127. To be maximally helpful, for a report that contains multiple separate
  1128. compilation units, and hence multiple files, submit them in the form of
  1129. a single file that is acceptable input to gnatchop (used to be called gnatsplit
  1130. on versions of GNAT prior to 1.80), i.e. contains no non-Ada text. If you use
  1131. banners to separate the files, make sure they are composed entirely of blank
  1132. lines or Ada comments.
  1133.  
  1134. If you want to be maximally helpful, try to reduce your example to a simple one
  1135. but DON'T spend too much time doing this. Especially when you are reporting
  1136. a blow up during compilation, rather than bad code generated, we can in 
  1137. practice work with big sources if you have trouble narrowing things down.
  1138.  
  1139. If a bug involves incorrect operation of the generated code, then the first
  1140. thing the program should do is to output a line indicating the expected
  1141. output or behavior. If at all possible, do a test later on that prints
  1142. out "passed" or "failed" depending on the behavior. Of course it may not
  1143. always be possible to structure a test this way, but that's the most 
  1144. convenient form (for obvious reasons!)
  1145.  
  1146. When we receive a bug report, we take a preliminary look to categorize it
  1147. into one of the following:
  1148.  
  1149.    1.  Pilot error, documentation problems, installation problems etc.
  1150.  
  1151.    2.  Interesting comment, suggestion etc, but not a bug
  1152.  
  1153.    3.  Bug that we already know about
  1154.  
  1155.    4.  Bug that is already fixed in our development version
  1156.  
  1157.    5.  Obvious bug that we correct immediately in our development version
  1158.  
  1159.    6.  Real genuine new unfixed bug.
  1160.  
  1161. In the first 5 cases, you will get a message telling you the status. In the
  1162. 6th case only, we assign a bug tracking number of the form mmdd-nnn, where
  1163. mmdd is the date of receipt, and nnn is a serial number (highest value so
  1164. far 005, but you never know!) In this case, the release notes will tell you
  1165. what the status of the bug is, and also we will send you a message when it
  1166. is fixed.
  1167.  
  1168. To send reports to us on the system, or ask questions, send messages to
  1169.  
  1170.     gnat-report@cs.nyu.edu
  1171.  
  1172. To contact team members, send messages to:
  1173.  
  1174.     dewar@cs.nyu.edu
  1175.     schonberg@cs.nyu.edu
  1176.  
  1177. To obtain electronically the latest version of the system, FTP from:
  1178.  
  1179.     cs.nyu.edu (directory pub/gnat)
  1180.  
  1181. This FTP directory also includes full sources for the system, full
  1182. documentation and technical notes, as well as executables of the system
  1183. for several targets. We are sorry that our limited resources do not allow
  1184. us to distribute the system through other media.
  1185.  
  1186. We trust that this information will be mirrored at other FTP sites around 
  1187. the world (we encourage such mirroring to occur), which will make it easier
  1188. for users in other continents to obtain the GNAT system without heavy
  1189. communication uncertainties.
  1190.  
  1191. Schedule.
  1192. ---------
  1193. We will make available new releases of GNAT at around 5 or 6 week intervals
  1194. for the time being. Please recall that releases of the system are still only
  1195. snapshots of work in progress. We hope that it will be of some use in the
  1196. work of others, even in its current embryonic form. 
  1197.  
  1198. A short gnat paper
  1199. ------------------
  1200. A TeX file of a short paper describing something about the GNAT project is
  1201. included under the name gnatdoc1.tex.
  1202.  
  1203. The GNAT development team.
  1204. ---------------------------
  1205.  
  1206.     New York University
  1207.  
  1208.          Bernard Banner (*)
  1209.          Cyrille Comar (*)
  1210.          Robert Dewar (*)
  1211.          Sam Figueroa (*)
  1212.          Richard Kenner (*)
  1213.          Bruno LeClerc (*)
  1214.          Brett Porter (*)
  1215.          Gail Schenker (*)
  1216.          Edmond Schonberg (*)
  1217.  
  1218.     Florida State University (Tasking runtime work)
  1219.  
  1220.          Ted Baker
  1221.          Ted Giering (*)
  1222.          Frank Muller
  1223.  
  1224.     Ecole Nationale Superieure de Telecommunications
  1225.  
  1226.              Patrick Bazire
  1227.          Franco Gasperoni (*)
  1228.          Yvon Kermarrec
  1229.          Laurent Pautet
  1230.  
  1231.     Elsewhere
  1232.  
  1233.          Paul Hilfinger (*) (University of California, Berkeley)
  1234.          Jean Pierre Rosen (*) (Paris)
  1235.          Richard Stallman (Free Software Foundation)
  1236.  
  1237. (*) partially supported by the NYU GNAT project
  1238.     (ARPA, USAF, AJPO, Ada 9X project office)
  1239.